package com.ylbh.modules.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylbh.common.pojo.member.vo.ConsumerVO;
import com.ylbh.common.pojo.member.dto.select.ConsumerSelectDTO;
import com.ylbh.common.pojo.member.vo.InvitationRecordExcel;
import com.ylbh.common.pojo.member.vo.InviteMembersVO;
import com.ylbh.common.pojo.member.AccExcel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 *
 * @author mgh
 * @date 2019-04-15 15:35:45
 */
@Mapper
@Repository
public interface ConsumerMapper extends BaseMapper<ConsumerVO> {
    /**
     * 消费者数量
     * @param params
     * @return
     */
    Integer getConsumerCount(ConsumerSelectDTO params);

    /**
     * 消费者数据列表
     * @param params
     * @return
     */
    List<ConsumerVO> selectConsumerList(@Param(value = "params") ConsumerSelectDTO params, Page page);

    /**
     * 会员邀请详情
     * @param recommendId
     * @return
     */
    InviteMembersVO selectInviteMembersDetailsById(@Param(value = "recommendId") String recommendId);

    List<AccExcel> selectAcc();

    List selectOrderCount(Long id);

    /**
     * 导出邀请记录
     * @param buyState
     * @param keywords
     * @param startTime
     * @param endTime
     * @return
     */
    List<InvitationRecordExcel> exportInvitationRecordExcel(@Param(value = "buyState") String buyState,
                                                            @Param(value = "keywords") String keywords,
                                                            @Param(value = "startTime") String startTime,
                                                            @Param(value = "endTime") String endTime);
}
